define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {

		//返回信息
		return {
			//站内信列表
			get_list: function(param, callback, error, done) {
				param = param || {}
				param.method = 'member.homepagemail.getlist';
				Http.post(param, callback, error, done);
			},
			//删除站内信
			delete: function(param, callback, error, done) {
				param = param || {}
				param.method = 'member.homepagemail.delete';
				Http.post(param, callback, error, done);
			},
			//标为已读
			marked: function(mail_id,callback) {
				Http.post({
					method:'member.homepagemail.marked', 
					mail_id:mail_id,
				}, function(result) {
					if(callback)
						callback(result);
				},function(err){

				},function(){
					
				});
			}
			
			
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("T_message", factory);
});